package com.thinkwide.data.ormapping.search;

import com.thinkwide.data.ormapping.search.enums.MFConditionType;

import java.util.ArrayList;

/**
 * 查询对象类
 *
 * @author andyzhang
 * @since 2022/01/05
 */
public class MFSearchConditions extends ArrayList<MFSearchConditionItem> {

    public MFSearchConditionItem add(boolean condition, String column, String value, MFConditionType type) {
        if (condition) {
            return add(column, value, type);
        }
        return null;
    }

    public MFSearchConditionItem add(String column, String value, MFConditionType type) {
        MFSearchConditionItem item = new MFSearchConditionItem(column, value, type);
        return item;
    }
}
